/*
 * This file is part of ELCube.
 *
 * ELCube is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * ELCube is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with ELCube.  If not, see <https://www.gnu.org/licenses/>.
 */
package cn.nkpro.elcube.security.gen;

import java.util.ArrayList;
import java.util.List;

public class AuthPermissionExample {
    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database table nk_auth_permission
     *
     * @mbggenerated
     */
    protected String orderByClause;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database table nk_auth_permission
     *
     * @mbggenerated
     */
    protected boolean distinct;

    /**
     * This field was generated by MyBatis Generator.
     * This field corresponds to the database table nk_auth_permission
     *
     * @mbggenerated
     */
    protected List<Criteria> oredCriteria;

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table nk_auth_permission
     *
     * @mbggenerated
     */
    public AuthPermissionExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table nk_auth_permission
     *
     * @mbggenerated
     */
    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table nk_auth_permission
     *
     * @mbggenerated
     */
    public String getOrderByClause() {
        return orderByClause;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table nk_auth_permission
     *
     * @mbggenerated
     */
    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table nk_auth_permission
     *
     * @mbggenerated
     */
    public boolean isDistinct() {
        return distinct;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table nk_auth_permission
     *
     * @mbggenerated
     */
    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table nk_auth_permission
     *
     * @mbggenerated
     */
    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table nk_auth_permission
     *
     * @mbggenerated
     */
    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table nk_auth_permission
     *
     * @mbggenerated
     */
    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table nk_auth_permission
     *
     * @mbggenerated
     */
    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table nk_auth_permission
     *
     * @mbggenerated
     */
    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    /**
     * This class was generated by MyBatis Generator.
     * This class corresponds to the database table nk_auth_permission
     *
     * @mbggenerated
     */
    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andPermIdIsNull() {
            addCriterion("PERM_ID is null");
            return (Criteria) this;
        }

        public Criteria andPermIdIsNotNull() {
            addCriterion("PERM_ID is not null");
            return (Criteria) this;
        }

        public Criteria andPermIdEqualTo(String value) {
            addCriterion("PERM_ID =", value, "permId");
            return (Criteria) this;
        }

        public Criteria andPermIdNotEqualTo(String value) {
            addCriterion("PERM_ID <>", value, "permId");
            return (Criteria) this;
        }

        public Criteria andPermIdGreaterThan(String value) {
            addCriterion("PERM_ID >", value, "permId");
            return (Criteria) this;
        }

        public Criteria andPermIdGreaterThanOrEqualTo(String value) {
            addCriterion("PERM_ID >=", value, "permId");
            return (Criteria) this;
        }

        public Criteria andPermIdLessThan(String value) {
            addCriterion("PERM_ID <", value, "permId");
            return (Criteria) this;
        }

        public Criteria andPermIdLessThanOrEqualTo(String value) {
            addCriterion("PERM_ID <=", value, "permId");
            return (Criteria) this;
        }

        public Criteria andPermIdLike(String value) {
            addCriterion("PERM_ID like", value, "permId");
            return (Criteria) this;
        }

        public Criteria andPermIdNotLike(String value) {
            addCriterion("PERM_ID not like", value, "permId");
            return (Criteria) this;
        }

        public Criteria andPermIdIn(List<String> values) {
            addCriterion("PERM_ID in", values, "permId");
            return (Criteria) this;
        }

        public Criteria andPermIdNotIn(List<String> values) {
            addCriterion("PERM_ID not in", values, "permId");
            return (Criteria) this;
        }

        public Criteria andPermIdBetween(String value1, String value2) {
            addCriterion("PERM_ID between", value1, value2, "permId");
            return (Criteria) this;
        }

        public Criteria andPermIdNotBetween(String value1, String value2) {
            addCriterion("PERM_ID not between", value1, value2, "permId");
            return (Criteria) this;
        }

        public Criteria andPermDescIsNull() {
            addCriterion("PERM_DESC is null");
            return (Criteria) this;
        }

        public Criteria andPermDescIsNotNull() {
            addCriterion("PERM_DESC is not null");
            return (Criteria) this;
        }

        public Criteria andPermDescEqualTo(String value) {
            addCriterion("PERM_DESC =", value, "permDesc");
            return (Criteria) this;
        }

        public Criteria andPermDescNotEqualTo(String value) {
            addCriterion("PERM_DESC <>", value, "permDesc");
            return (Criteria) this;
        }

        public Criteria andPermDescGreaterThan(String value) {
            addCriterion("PERM_DESC >", value, "permDesc");
            return (Criteria) this;
        }

        public Criteria andPermDescGreaterThanOrEqualTo(String value) {
            addCriterion("PERM_DESC >=", value, "permDesc");
            return (Criteria) this;
        }

        public Criteria andPermDescLessThan(String value) {
            addCriterion("PERM_DESC <", value, "permDesc");
            return (Criteria) this;
        }

        public Criteria andPermDescLessThanOrEqualTo(String value) {
            addCriterion("PERM_DESC <=", value, "permDesc");
            return (Criteria) this;
        }

        public Criteria andPermDescLike(String value) {
            addCriterion("PERM_DESC like", value, "permDesc");
            return (Criteria) this;
        }

        public Criteria andPermDescNotLike(String value) {
            addCriterion("PERM_DESC not like", value, "permDesc");
            return (Criteria) this;
        }

        public Criteria andPermDescIn(List<String> values) {
            addCriterion("PERM_DESC in", values, "permDesc");
            return (Criteria) this;
        }

        public Criteria andPermDescNotIn(List<String> values) {
            addCriterion("PERM_DESC not in", values, "permDesc");
            return (Criteria) this;
        }

        public Criteria andPermDescBetween(String value1, String value2) {
            addCriterion("PERM_DESC between", value1, value2, "permDesc");
            return (Criteria) this;
        }

        public Criteria andPermDescNotBetween(String value1, String value2) {
            addCriterion("PERM_DESC not between", value1, value2, "permDesc");
            return (Criteria) this;
        }

        public Criteria andPermResourceIsNull() {
            addCriterion("PERM_RESOURCE is null");
            return (Criteria) this;
        }

        public Criteria andPermResourceIsNotNull() {
            addCriterion("PERM_RESOURCE is not null");
            return (Criteria) this;
        }

        public Criteria andPermResourceEqualTo(String value) {
            addCriterion("PERM_RESOURCE =", value, "permResource");
            return (Criteria) this;
        }

        public Criteria andPermResourceNotEqualTo(String value) {
            addCriterion("PERM_RESOURCE <>", value, "permResource");
            return (Criteria) this;
        }

        public Criteria andPermResourceGreaterThan(String value) {
            addCriterion("PERM_RESOURCE >", value, "permResource");
            return (Criteria) this;
        }

        public Criteria andPermResourceGreaterThanOrEqualTo(String value) {
            addCriterion("PERM_RESOURCE >=", value, "permResource");
            return (Criteria) this;
        }

        public Criteria andPermResourceLessThan(String value) {
            addCriterion("PERM_RESOURCE <", value, "permResource");
            return (Criteria) this;
        }

        public Criteria andPermResourceLessThanOrEqualTo(String value) {
            addCriterion("PERM_RESOURCE <=", value, "permResource");
            return (Criteria) this;
        }

        public Criteria andPermResourceLike(String value) {
            addCriterion("PERM_RESOURCE like", value, "permResource");
            return (Criteria) this;
        }

        public Criteria andPermResourceNotLike(String value) {
            addCriterion("PERM_RESOURCE not like", value, "permResource");
            return (Criteria) this;
        }

        public Criteria andPermResourceIn(List<String> values) {
            addCriterion("PERM_RESOURCE in", values, "permResource");
            return (Criteria) this;
        }

        public Criteria andPermResourceNotIn(List<String> values) {
            addCriterion("PERM_RESOURCE not in", values, "permResource");
            return (Criteria) this;
        }

        public Criteria andPermResourceBetween(String value1, String value2) {
            addCriterion("PERM_RESOURCE between", value1, value2, "permResource");
            return (Criteria) this;
        }

        public Criteria andPermResourceNotBetween(String value1, String value2) {
            addCriterion("PERM_RESOURCE not between", value1, value2, "permResource");
            return (Criteria) this;
        }

        public Criteria andPermOperateIsNull() {
            addCriterion("PERM_OPERATE is null");
            return (Criteria) this;
        }

        public Criteria andPermOperateIsNotNull() {
            addCriterion("PERM_OPERATE is not null");
            return (Criteria) this;
        }

        public Criteria andPermOperateEqualTo(String value) {
            addCriterion("PERM_OPERATE =", value, "permOperate");
            return (Criteria) this;
        }

        public Criteria andPermOperateNotEqualTo(String value) {
            addCriterion("PERM_OPERATE <>", value, "permOperate");
            return (Criteria) this;
        }

        public Criteria andPermOperateGreaterThan(String value) {
            addCriterion("PERM_OPERATE >", value, "permOperate");
            return (Criteria) this;
        }

        public Criteria andPermOperateGreaterThanOrEqualTo(String value) {
            addCriterion("PERM_OPERATE >=", value, "permOperate");
            return (Criteria) this;
        }

        public Criteria andPermOperateLessThan(String value) {
            addCriterion("PERM_OPERATE <", value, "permOperate");
            return (Criteria) this;
        }

        public Criteria andPermOperateLessThanOrEqualTo(String value) {
            addCriterion("PERM_OPERATE <=", value, "permOperate");
            return (Criteria) this;
        }

        public Criteria andPermOperateLike(String value) {
            addCriterion("PERM_OPERATE like", value, "permOperate");
            return (Criteria) this;
        }

        public Criteria andPermOperateNotLike(String value) {
            addCriterion("PERM_OPERATE not like", value, "permOperate");
            return (Criteria) this;
        }

        public Criteria andPermOperateIn(List<String> values) {
            addCriterion("PERM_OPERATE in", values, "permOperate");
            return (Criteria) this;
        }

        public Criteria andPermOperateNotIn(List<String> values) {
            addCriterion("PERM_OPERATE not in", values, "permOperate");
            return (Criteria) this;
        }

        public Criteria andPermOperateBetween(String value1, String value2) {
            addCriterion("PERM_OPERATE between", value1, value2, "permOperate");
            return (Criteria) this;
        }

        public Criteria andPermOperateNotBetween(String value1, String value2) {
            addCriterion("PERM_OPERATE not between", value1, value2, "permOperate");
            return (Criteria) this;
        }

        public Criteria andLimitIdIsNull() {
            addCriterion("LIMIT_ID is null");
            return (Criteria) this;
        }

        public Criteria andLimitIdIsNotNull() {
            addCriterion("LIMIT_ID is not null");
            return (Criteria) this;
        }

        public Criteria andLimitIdEqualTo(String value) {
            addCriterion("LIMIT_ID =", value, "limitId");
            return (Criteria) this;
        }

        public Criteria andLimitIdNotEqualTo(String value) {
            addCriterion("LIMIT_ID <>", value, "limitId");
            return (Criteria) this;
        }

        public Criteria andLimitIdGreaterThan(String value) {
            addCriterion("LIMIT_ID >", value, "limitId");
            return (Criteria) this;
        }

        public Criteria andLimitIdGreaterThanOrEqualTo(String value) {
            addCriterion("LIMIT_ID >=", value, "limitId");
            return (Criteria) this;
        }

        public Criteria andLimitIdLessThan(String value) {
            addCriterion("LIMIT_ID <", value, "limitId");
            return (Criteria) this;
        }

        public Criteria andLimitIdLessThanOrEqualTo(String value) {
            addCriterion("LIMIT_ID <=", value, "limitId");
            return (Criteria) this;
        }

        public Criteria andLimitIdLike(String value) {
            addCriterion("LIMIT_ID like", value, "limitId");
            return (Criteria) this;
        }

        public Criteria andLimitIdNotLike(String value) {
            addCriterion("LIMIT_ID not like", value, "limitId");
            return (Criteria) this;
        }

        public Criteria andLimitIdIn(List<String> values) {
            addCriterion("LIMIT_ID in", values, "limitId");
            return (Criteria) this;
        }

        public Criteria andLimitIdNotIn(List<String> values) {
            addCriterion("LIMIT_ID not in", values, "limitId");
            return (Criteria) this;
        }

        public Criteria andLimitIdBetween(String value1, String value2) {
            addCriterion("LIMIT_ID between", value1, value2, "limitId");
            return (Criteria) this;
        }

        public Criteria andLimitIdNotBetween(String value1, String value2) {
            addCriterion("LIMIT_ID not between", value1, value2, "limitId");
            return (Criteria) this;
        }

        public Criteria andPermLevelIsNull() {
            addCriterion("PERM_LEVEL is null");
            return (Criteria) this;
        }

        public Criteria andPermLevelIsNotNull() {
            addCriterion("PERM_LEVEL is not null");
            return (Criteria) this;
        }

        public Criteria andPermLevelEqualTo(String value) {
            addCriterion("PERM_LEVEL =", value, "permLevel");
            return (Criteria) this;
        }

        public Criteria andPermLevelNotEqualTo(String value) {
            addCriterion("PERM_LEVEL <>", value, "permLevel");
            return (Criteria) this;
        }

        public Criteria andPermLevelGreaterThan(String value) {
            addCriterion("PERM_LEVEL >", value, "permLevel");
            return (Criteria) this;
        }

        public Criteria andPermLevelGreaterThanOrEqualTo(String value) {
            addCriterion("PERM_LEVEL >=", value, "permLevel");
            return (Criteria) this;
        }

        public Criteria andPermLevelLessThan(String value) {
            addCriterion("PERM_LEVEL <", value, "permLevel");
            return (Criteria) this;
        }

        public Criteria andPermLevelLessThanOrEqualTo(String value) {
            addCriterion("PERM_LEVEL <=", value, "permLevel");
            return (Criteria) this;
        }

        public Criteria andPermLevelLike(String value) {
            addCriterion("PERM_LEVEL like", value, "permLevel");
            return (Criteria) this;
        }

        public Criteria andPermLevelNotLike(String value) {
            addCriterion("PERM_LEVEL not like", value, "permLevel");
            return (Criteria) this;
        }

        public Criteria andPermLevelIn(List<String> values) {
            addCriterion("PERM_LEVEL in", values, "permLevel");
            return (Criteria) this;
        }

        public Criteria andPermLevelNotIn(List<String> values) {
            addCriterion("PERM_LEVEL not in", values, "permLevel");
            return (Criteria) this;
        }

        public Criteria andPermLevelBetween(String value1, String value2) {
            addCriterion("PERM_LEVEL between", value1, value2, "permLevel");
            return (Criteria) this;
        }

        public Criteria andPermLevelNotBetween(String value1, String value2) {
            addCriterion("PERM_LEVEL not between", value1, value2, "permLevel");
            return (Criteria) this;
        }
    }

    /**
     * This class was generated by MyBatis Generator.
     * This class corresponds to the database table nk_auth_permission
     *
     * @mbggenerated do_not_delete_during_merge
     */
    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    /**
     * This class was generated by MyBatis Generator.
     * This class corresponds to the database table nk_auth_permission
     *
     * @mbggenerated
     */
    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}